package com.tuo51.evaluate.domain.evaluatingV2;

import com.tuo51.evaluate.vo.evaluate.EvaluateV2ExtInfoVO;
import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Data
@Entity
@Table(name = "tb_evaluate_record")
@EqualsAndHashCode(callSuper = true)
public class EvaluateV2Record extends Domain{

    @Column(columnDefinition = " varchar(10) DEFAULT 'normal' COMMENT '测评模式' ")
    private String evaluateType;

    @Column(columnDefinition = " varchar(32) COMMENT '宝宝id' ")
    private String childrenId;

    @Column(columnDefinition = " varchar(50) COMMENT '宝宝名称' ")
    private String childrenName;

    @Column(columnDefinition = " varchar(50) COMMENT '宝宝昵称' ")
    private String childrenNickName;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '性别 0：女 1：男' ")
    private Integer gender = 0;

    @Column(columnDefinition = " datetime COMMENT '宝宝生日' ")
    private Date birthday;

    @Column(columnDefinition = " varchar(20) COMMENT '体重' ")
    private String weight;

    @Column(columnDefinition = " varchar(20) COMMENT '身高' ")
    private String height;

    @Column(columnDefinition = " varchar(20) COMMENT '头围' ")
    private String header;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '健康信息来源 1：签到, 2:儿保信息' ")
    private Integer healthInfoFromType = 0;

    @Column(columnDefinition = " varchar(32) COMMENT '健康信息来源id' ")
    private String healthInfoFromDomainId;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '月龄' ")
    private Integer month = 0;

    @Column(columnDefinition = " int DEFAULT 1 COMMENT '状态 1：未评估，2：已归档' ")
    private Integer status = 1;

    @Column(columnDefinition = " varchar(500) COMMENT '总体评估及建议' ")
    private String advise;

    @Column(columnDefinition = " varchar(32) COMMENT '创建老师id' ")
    private String createTeacherId;

    @Column(columnDefinition = " varchar(50) COMMENT '创建老师名称' ")
    private String createTeacherName;

    @Column(columnDefinition = " varchar(32) COMMENT '评估老师id' ")
    private String evaluatingTeacherId;

    @Column(columnDefinition = " varchar(50) COMMENT '评估老师名称' ")
    private String evaluatingTeacherName;

    @Column(columnDefinition = " varchar(32) COMMENT '机构id' ")
    private String areaId;

    @Column(columnDefinition = "varchar(5) default '' COMMENT '评估报告分级' ")
    private String rating;

    @Column(columnDefinition = "int DEFAULT 0 COMMENT '发育商' ")
    private int dq;

    @Column(columnDefinition = "int DEFAULT 0 COMMENT '总操作时间，单位秒' ")
    private Long duration;

    @Column(columnDefinition = " datetime COMMENT '评估时间' ")
    private Date evaluatingDate;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '记录类型 1：签约前初评，2，签约后测评' ")
    private Integer category = 0;

    //测评是不是已经完成了所有维度的填写
    @Column(columnDefinition = " bit DEFAULT 0 COMMENT '状态 false：未完成，true：已完成' ")
    private Boolean finished = false;

    @Column(columnDefinition = " bit DEFAULT 0 COMMENT '是否购买状态 0：否，1是' ")
    private Boolean paid = false;

    @Column(columnDefinition = " bit DEFAULT 0 COMMENT '家长启用 0：否，1是' ")
    private Boolean parentGranted = false;

    //测评发布状态
    @Column(columnDefinition = " bit DEFAULT 0 COMMENT '状态 false：未发布，true：已发布' ")
    private Boolean published = false;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '记录类型 1：签约前初评，2，签约后测评' ", nullable = false)
    private Integer demoType = 0;

    @Column(columnDefinition = " varchar(200) COMMENT '需要跳过的维度' ")
    private String skipDiemnsions;

    @Transient
    private List<EvaluateV2ExtInfoVO> highLevelInfo;

    @Transient
    private List<EvaluateV2RecordDimensionScore> dimensionScores;
}
